from flask import Flask, url_for
from werkzeug.routing import BaseConverter

app = Flask(import_name=__name__)
app.debug = True



# '/index/<regex("\d+"):nid>' ":"后面不能有空格
# app.url_map.converters['lint'] = RegexConverter

@app.route('/index/<lint:nid>', endpoint="index")
def index(nid):
    # from flask import  request
    # request.method=='GET'
    print(nid, type(nid))
    # print(url_for('index', nid='999'))

    return "index"

if __name__ == '__main__':
    app.run()